package com.guocheng.modules.meet.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@Data
@TableName("gc_meet_signin")
public class MeetSignin {

    public MeetSignin(Meet meet){
        this.id=meet.getId();       //会议id
        this.name=meet.getName();   //会议名称
        //会议时间
        this.meetTime = (meet.getStartTimeStr() + " - " + meet.getEndTimeStr()).replace("T"," ");
        this.roomName = meet.getRoomName();     //会议室名称
        this.status = meet.getStatus();         //会议状态
        this.numberPeople = meet.getCount();    //会议人数
        this.attendance=0;      //实到人数
        this.beforeNumber=meet.getCount();    //未到人数
    }

    public MeetSignin(Integer id, Integer status) {
        this.id = id;
        this.status = status;
    }

    //会议签到
    @TableId(type = IdType.INPUT)
    private Integer id;

    //会议名称
    private String name;

    //会议时间
    private String meetTime;

    //会议室
    private String roomName;

    //应到人数
    private Integer numberPeople;

    //状态
    private Integer status;

    //实到人数
    private Integer attendance;

    //未到人数
    private Integer beforeNumber;

}
